package guis;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;

import sql.SQLs;
import connectionPool.PoolException;

public class Kommentar {
	
	ArrayList<String> kommentar = new ArrayList<String>();
	
	public Kommentar(){
		ResultSet rs = null;
		try {
			rs = SQLs.auswaehlen("KommentarID, Status", "kommentar");
			while(rs.next()){
				kommentar.add(rs.getString(2) + "," + rs.getString(1));
			}
		} catch (PoolException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	
	public Collection<String> getKommentar(){
		return kommentar;
	}

}